fn main() {
    let s1 = String::from("ABCD");
    let s2 = "XYZ";
    let result = longest(s1.as_str(), s2);
    println!("{}", result);
}

// fn longest<'t>(x: &'t str, y:&'t str)->&'t str{
fn longest<'a>(x: &'a str, y:&'a str)->&'a str{
    if x.len()>y.len(){
        x
    }else{
        y
    }
}
